function checkUser(){
    let usernameV =document.getElementById("username").value;
    //1.创建xhr对象
    let xhr=new XMLHttpRequest || new ActiveXObject("Microsoft.XMLHTTP");

    //2.注册回调函数
    xhr.onreadystatechange=function(){
        console.log(xhr);
        if(xhr.readyState==4){
            document.getElementById("msg").innerHTML=xhr.responseText
        }
    }

    //3.xhr向服务器发起连接
    xhr.open("get","/checkUser.do?username="+usernameV);

    //4.发送参数
    xhr.send(null);

}   